package ModelLayer;


/**
 * A class to represent a product
 * 
 * @author Mike M. Madsen, Rasmus A. Borup
 * @version 15/12-2013
 */
public class Product
{
    private int amountInStock;
    private int productID;
    private int productGroup;
    private String productName;
    private String productDesc;
    private String EAN;
    private double price;
    private double discount;
    
    /**
     * Constructor for objects of class Product
     */
    public Product(int productID, String productName, String productDesc, String EAN, int productGroup, int amountInStock, double price, double discount)
    {
        this.productID = productID;
        this.productName = productName;
        this.productDesc = productDesc;
        this.EAN = EAN;
        this.productGroup = productGroup;
        this.amountInStock = amountInStock;
        this.price = price;
        this.discount = discount;
    }
    
    /**
     * Constructor for objects of class Product without parameters for easy testing
     */
    public Product()
    {
        amountInStock = 100;
        productID = 100000;
        productGroup = 1;
        productName = "Philips screwdriver";
        productDesc = "Small Philips screwdriver";
        EAN = "10100";
        price = 79;
        discount = 10;
    }
    
    /**
     * Returns a string with details about a product
     */
    public String getProductDetails()
    {
        String productDetails = (productName + " " + productDesc + " EAN: " + EAN);
        return productDetails;
    }
    
    //Accessor Methods:
    public int getProductID()
    {
        return productID;
    }
    
    public String getProductName()
    {
        return productName;
    }
    
    public String getProductDesc()
    {
        return productDesc;
    }
    
    public String getEAN()
    {
        return EAN;
    }
    
    public int getProductGroup()
    {
        return productGroup;
    }
    
    public int getAmountInStock()
    {
        return amountInStock;
    }
    
    public double getPrice()
    {
        return price;
    }
    
    public double getDiscount()
    {
        return discount;
    }
    
    //Mutator Methods:
    public void setProductID(int productID)
    {
        this.productID = productID;
    }
    
    public void setProductName(String productName)
    {
        this.productName = productName;
    }
    
    public void setProductDesc(String productDesc)
    {
        this.productDesc = productDesc;
    }
    
    public void setEAN(String EAN)
    {
        this.EAN = EAN;
    }
    
    public void setProductGroup(int productGroup)
    {
        this.productGroup = productGroup;
    }
    
    public void setAmountInStock(int amountInStock)
    {
        this.amountInStock = amountInStock;
    }
    
    public void setPrice(double price)
    {
        this.price = price;
    }
    
    public void setDiscount(double discount)
    {
        this.discount = discount;
    }
}
    
    

